package com.chance.cc.crawler.prod.command.trigger.domain.commerce.tm.supplement;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.commerce.tm.supplement.TBTMPCommentDailySupplementCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.commerce.tm.supplement.TMProductCommentSupplementCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;
import org.apache.commons.lang3.StringUtils;


public class TMCommonSupplementCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {


    public static void main(String[] args) {
//        publishTMCommentScheduleTriggerInfo4();
        publishTMCommentScheduleTriggerInfo();

    }

    public static void publishTMCommentScheduleTriggerInfo1(){
        CrawlerJob crawlerJob = TMProductCommentSupplementCrawlerScheduleJob.tianmaoSchduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                StringUtils.joinWith("-",crawlerJob.generateCrawlerTriggerKey(),1),
                TMProductCommentSupplementCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "天猫评论单次采集");
    }

    public static void publishTMCommentScheduleTriggerInfo2(){
        CrawlerJob crawlerJob = TMProductCommentSupplementCrawlerScheduleJob.tianmaoSchduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                StringUtils.joinWith("-",crawlerJob.generateCrawlerTriggerKey(),2),
                TMProductCommentSupplementCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "天猫评论单次采集");
    }

    public static void publishTMCommentScheduleTriggerInfo3(){
        CrawlerJob crawlerJob = TMProductCommentSupplementCrawlerScheduleJob.tianmaoSchduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                StringUtils.joinWith("-",crawlerJob.generateCrawlerTriggerKey(),3),
                TMProductCommentSupplementCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "天猫评论单次采集");
    }

    public static void publishTMCommentScheduleTriggerInfo4(){
        CrawlerJob crawlerJob = TBTMPCommentDailySupplementCrawlerScheduleJob.taobaoSchduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                TBTMPCommentDailySupplementCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "天猫评论单次采集");
    }

    public static void publishTMCommentScheduleTriggerInfo(){
        CrawlerJob crawlerJob = TMProductCommentSupplementCrawlerScheduleJob.tianmaoSchduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                TMProductCommentSupplementCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "天猫评论单次采集");
    }
}
